Resonant scanning mirror driver circuit

ABSTRACT

A resonant scanning mirror driver configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizes a PWM pattern selected from patterns having 32, 40, 48, 56 or 64 bits. The patterns reflect the first positive and negative quarters of the PWM pattern and the remaining quarters are generated utilizing the symmetry of the sine wave that is generated.

CROSS REFERENCES TO RELATED APPLICATIONS

This application is a continuation-in-part of application Ser. No. 10/172,579, now U.S. Pat. No. 6,812,669 B2, filed on Jun. 14, 2002, which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

This invention relates generally to micro-electro-mechanical system (MEMS) mirrors, and more particularly, to a MEMS resonant scanning mirror driver circuit.

DESCRIPTION OF THE PRIOR ART

Movement of a resonant MEMS mirror is accomplished using a control loop that includes a sinusoidal driver circuit. This driver circuit must have low harmonic distortion characteristics in order to precisely and accurately control movement of the MEMS mirror. Such driver circuits generally require use of either a precision analog oscillator or a fast and therefore expensive digital-to-analog converter (DAC) devices and accompanied sine wave logic to control the amplitude of the drive signal to a MEMS resonant scanning mirror.

In view of the foregoing, it would be desirable and advantageous in the MEMS mirror art to provide a resonant scanning mirror driver circuit that allows use of an inexpensive means of generating the sine wave and an inexpensive DAC with a relatively slow sample rate commensurate with a microprocessor based control algorithm.

SUMMARY OF THE INVENTION

The present invention is directed to a MEMS resonant scanning mirror driver circuit. The driver circuit has separate amplitude and waveshape inputs which allows a relatively slow and therefore inexpensive DAC to be used to control the amplitude of the drive signal for the MENS device.

According to one aspect, a resonant scanning mirror driver circuit is provided that has an analog input to set the amplitude of a sinusoidal drive voltage and further has a PWM digital input that generates the sinusoidal waveform.

A second aspect of the invention includes a resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 32 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of:

Pos quarter Neg quarter pattern pattern 10111111 01000000 11011111 00100000 11101111 00010000 00111111 11000000 01111111 10000000 01110111 10001000 01101111 10010000 11011011 00100100 01011111 10100000 00111011 11000100

A third aspect of the invention includes a resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 40 bits, first positive and negative quarters of PWM pattern being selected from the group consisting of:

Pos quarter Neg quarter pattern pattern 1110111111 0001000000 1101111111 0010000000 0101111111 1010000000 0110111111 1001000000 0111011111 1000100000 0011111111 1100000000 1011101111 0100010000 1011111111 0100000000 1101110111 0010001000 0011110111 1100001000

A fourth aspect of the invention includes a resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 48 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of:

Pos quarter Neg quarter pattern pattern 011011111111 100100000000 011101111111 100010000000 010110111011 101001000100 101110111111 010001000000 001111011111 110000100000 010111111111 101000000000 100111111111 011000000000 010111101111 101000010000 110111011111 001000100000 101101111111 010010000000

A fifth aspect of the invention includes a resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 56 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of:

Pos quarter Neg quarter pattern pattern 10111011111111 01000100000000 10110111111111 01001000000000 00111101111111 11000010000000 00111011111111 11000100000000 11011101111111 00100010000000 01011011110111 10100100001000 01011110111111 10100001000000 10101111111111 01010000000000 10011111011111 01100000100000 00110111111111 11001000000000

A sixth aspect of the invention includes a resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 64 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of:

Pos quarter Neg quarter Pattern pattern 0101110111111111 1010001000000000 1101101111111111 0010010000000000 1101110111111111 0010001000000000 0101111011111111 1010000100000000 1001111101111111 0110000010000000 0011101111111111 1100010000000000 0101101101111011 1010010010000100 1110110111111111 0001001000000000 1101011111111111 0010100000000000 1101011111011111 0010100000100000

A seventh aspect of the invention includes a micro-electro-mechanical system (MEMS) resonant scanning mirror driver utilizing a PWM pattern to drive the mirror to a desired deflection, the PWM pattern being selected for reduced harmonic distortion by generating a drive signal utilizing PWM patterns for a predetermined number of bits. The drive signal is digitally sampled at a rate of at least N*f_(o), where N=the number of bits in the PWM pattern and f_(o)=the clock frequency. The generation of a drive signal and the digital sampling is repeated at least K times where K=the Q of the system. The deflection of the mirror is estimated utilizing a second order linear model of the mirror dynamics converted to a discrete time model of the system. A Fast Fourier Transform (FFT) of the estimated deflection is generated. The harmonic distortion is determined as ratio of power of first harmonic to sum of powers of second through ninth harmonics.

BRIEF DESCRIPTION OF THE DRAWINGS

Other aspects, features and advantages of the present invention will be readily appreciated, as the invention becomes better understood by reference to the following detailed description when considered in connection with the accompanying drawing figure wherein:

FIG. 1 is a timing diagram depicting a tri-level PWM pulse waveform;

FIG. 2 is a schematic diagram illustrating a resonant scanning mirror driver circuit according to one embodiment of the present invention;

FIG. 3 is a graph illustrating harmonic distortion with respect to pulse width and pulse width as a proportion of period for the resonant scanning mirror driver circuit shown in FIG. 2 when driven with a tri-level PWM pulse waveform such as depicted in FIG. 1;

FIGS. 4 a and 4 b illustrate a digital pattern and a waveform diagram showing a single pulse width modulated digital signal wherein the single pulse width modulated digital signal shown in FIG. 4 b is generated from the digital pattern shown in FIG. 4 a;

FIG. 5 is a schematic diagram illustrating a resonant scanning mirror driver circuit according to another embodiment of the present invention and that can be driven with the single pulse width modulated digital signal shown in FIG. 4 b;

FIG. 6 is a schematic diagram illustrating a resonant scanning mirror driver circuit according to yet another embodiment of the present invention and that can be driven with the single pulse width modulated digital signal shown in FIG. 4 b.

While the above-identified drawing figure sets forth particular embodiments, other embodiments of the present invention are also contemplated, as noted in the discussion. In all cases, this disclosure presents illustrated embodiments of the present invention by way of representation and not limitation. Numerous other modifications and embodiments can be devised by those skilled in the art which fall within the scope and spirit of the principles of this invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

As stated herein before, movement of a MEMS mirror is accomplished using a control loop that includes a driver circuit. This driver circuit must have low harmonic distortion characteristics in order to precisely and accurately control movement of the MEMS mirror. Such driver circuits generally require use of fast and therefore expensive digital-to-analog converter (DAC) devices to control the amplitude of the drive signal to a MEMS resonant scanning mirror. A resonant scanning mirror driver circuit that allows use of a relatively slow and therefore inexpensive DAC to control the amplitude of the drive signal to the MEMS resonant scanning mirror is now described below with reference to FIGS. 1-5.

FIG. 1 is a waveform diagram depicting a tri-level PWM pulse waveform 10 associated with the current passing through a MEMS resonant scanning mirror device. PWM pulse waveform 10 has a positive pulse 12, a nominal zero level 14, and a negative pulse 16.

FIG. 2 is a schematic diagram illustrating a resonant scanning mirror driver circuit 100 according to one embodiment of the present invention. Driver circuit 100 has an analog input 102 to set the amplitude of sinusoidal drive voltage to the MEMS resonant scanning mirror device 104. Driver circuit 100 further has PWM digital inputs 106, 108 that provide a tri-level PWM pulse waveform, such as waveform 10 depicted in FIG. 1, to generate the desired sinusoidal waveform signal to the MEMS device 104. Driver circuit 100 generates a voltage output, and therefore is sensitive to temperature induced changes in the MEMS device 104 coil resistance Rc. Those skilled in the resonant scanning mirror art will readily appreciate that such a voltage output will provide several advantages over a transconductance amplifier if the actual application includes a beam position feedback. Resonant scanning mirror driver circuit 100 was found by the present inventor to achieve less than −60 dB harmonic distortion in a laser beam deflection using its lowest possible PWM clock.

Resonant scanning mirror driver circuit 100 can be defined mathematically according to its transfer function written as $\begin{matrix} {{\frac{I_{coil}}{\left( {v_{1} - v_{2}} \right)} = {\frac{\left( {{\frac{1}{L_{c}}s} + \frac{G\quad\omega^{2}}{R_{c}}} \right)}{s^{2} + {\frac{R_{c}}{L_{c}}s} + \omega^{2}} = \frac{\frac{1}{L_{c}}\left( {s + \frac{G}{R_{f}C_{f}}} \right)}{s^{2} + {\frac{R_{c}}{L_{c}}s} + \omega^{2}}}},} & \left( {{equation}\quad 1} \right) \end{matrix}$ where the DC voltage gain is $G = {{1 + \frac{2\quad R_{f}}{R_{g}}} = 5}$ for the component values set forth in FIG. 2. Since the cutoff frequency is defined by ${\omega^{2} = \frac{R_{c}}{R_{f}L_{c}C_{f}}},$ the values R_(c)=60 Ohms, L_(c)=4.8 mH, and C_(f)=3300 pF shown in FIG. 1 yield a cutoff of 3.1 kHz. The Q of the poles for these component values is ${\frac{\omega\quad L_{c}R_{c}}{R_{c}^{2} + {L_{c}^{2}\quad\omega^{2}}} \approx \frac{\omega\quad L_{c}}{R_{c}}} = {1.5.}$ The zero is then at $\omega_{z} = {\frac{G}{R_{f}C_{f}} = {24\quad{{kHz}.}}}$ The input network associated with driver circuit 100 is configured such that the voltage applied to the analog input Vr is also applied across the MEMS device 104 coil.

The mechanical transfer function according to one embodiment of the MEMS mirror 104 can be mathematically defined as $\begin{matrix} \begin{matrix} {{\frac{deflection}{I_{coil}} = \frac{\omega_{res}^{2}}{s^{2} + {\frac{\omega_{res}}{Q}s} + \omega_{res}^{2}}},} \\ \text{for~~a~~normalized~~deflection~~gain,} \end{matrix} & \left( {{equation}\quad 2} \right) \end{matrix}$ where the resonant frequency ω_(res) for the MEMS mirror 104 was found to be 3,100 Hz with a Q=50. The harmonic distortion in deflection associated with the above MEMS mirror 104 can be mathematically defined as $\begin{matrix} {10\quad{{\log_{10}\left( \frac{\sum\limits_{n = 2}^{9}{harm}_{n}}{{harm}_{1}} \right)}.}} & \left( {{equation}\quad 3} \right) \end{matrix}$

FIG. 3 is a graph illustrating harmonic distortion 200 with respect to pulse width, and pulse width as a proportion of period for the resonant scanning mirror driver circuit 100 shown in FIG. 2 when driven with a tri-level PWM pulse waveform such as depicted in FIG. 1. Specifically, the upper plot 202 shows the harmonic distortion with a high bandwidth on the amplifier, while the lower plot 204 shows the harmonic distortion with a bandwidth of 3.1 kHz. The best performance can be seen to occur when the positive and negative pulses are each about ⅓ of a period. The harmonics in the deflection can then be virtually eliminated by limiting the bandwidth of the amplifier.

FIGS. 4 a and 4 b depict a waveform diagram showing a single pulse width modulated (PWM) digital signal 300. PWM signal 300 can also be used to generate a sine wave for the MEMS mirror 104 coil drive so long as PWM signal 300 has a sufficiently high clock rate so that the harmonics in the digital signal are attenuated by the transfer function of the associated mirror driver circuit. Specifically, FIG. 4 a depicts a digital pattern that is repeated continuously to generate the PWM waveform with a 64× oversample clock seen in FIG. 4 b, wherein the digital clock is set to 64× the resonant frequency of the MEMS device. The single pulse width modulated digital signal 300 was found by the present inventor to provide less harmonic distortion (<−100 dB) than that achievable using the tri-level scheme described herein before with reference to FIGS. 1-3.

It is desirable to find the PWM signals that have bit patterns which minimize the harmonic distortion in the sine wave mirror deflection. It is also desirable to find the bit patterns that provide the low harmonic distortion and a high amplitude, so that the drive signal is efficiently generated. In the examples given, the number of bits equals the number of clock cycles, as each bit takes one clock cycle. A process for determining these bit patterns is described below and tables containing the best sequences for various pattern bit lengths are provided.

In order to pick the best PWM patterns, the mirror dynamics are modeled as an underdamped second order linear system represented by a restatement of equation 2: ${{deflection}(s)} = {\frac{\omega_{o}^{2}}{s^{2} + {\frac{\omega_{o}}{Q}s} + \omega_{o}^{2}}i_{coil}}$ and the mirror deflection coil transfer function is modeled as $\begin{matrix} {{i_{coil}(s)} = {{\frac{1}{L_{coil}} \cdot \frac{1}{s + \frac{R_{coil} + R_{s}}{L_{coil}}}}v_{drive}}} & \left( {{equation}\quad 4} \right) \end{matrix}$

In one example Q=50, ω_(o)=2*π*3000 R_(coil)+R_(s)=60 ohms and L_(coil)=4.5 mH

The desired number of clocks per period for the PWM pattern is chosen. This does not have to be a binary multiple, but if it is divisible by 8 we can take into account symmetries when searching for the best patterns that will substantially reduce the effort in finding the best patterns. Note that the second half of a sine wave is the negative of the first half. This means that the binary values for the second half of the PWM pattern that best generates a sine wave will be the binary inverse of the first half of the PWM pattern. This reduces the number of possible patterns from 2^(N) to $2^{\frac{N}{2}}.$ Also note that the second quarter of a sine wave is the time reversed version of the first quarter. Therefore by constructing the candidate patterns with this property we can reduce the number of patterns to search to $2^{\frac{N}{4}}.$ Finally, for every positive going PWM generated sine wave, there will be a negative going sine wave with the same harmonic distortion characteristic. These complementary patterns will be the binary inverse of each other. therefore we can limit the search further by forcing the first bit to be a zero. This means that $2^{({\frac{N}{4} - 1})}$ patterns need to be searched to locate all possible candidate patterns. For example, if N=64 then 32,768 patterns need to be evaluated. This reduces the problem to a manageable number of patterns to be evaluated. Without taking advantage of these symmetries, the number would be 2⁶⁴=18, 446, 744, 073, 709, 551, 616 patterns for evaluation, an unmanageable task.

To estimate the performance of each PWM pattern, the digital sample rate is set at N*f_(o) (or higher) and the second order linear model of the mirror dynamics is represented as a discrete time model of the system. Each PWM pattern is constructed using the symmetry described above and the pattern repeated K times. This repeated pattern is used as the input to the discrete time model of the mirror. The pattern needs to be repeated enough times to allow the natural response of the dynamic model to die off. Simulations show that for a Q of 50, consistent results are obtained with 50 or more repetitions. The Fast Fourier Transform (FFT) of the resulting estimated deflection is taken. The amplitude of the first harmonic is found and the harmonic distortion defined as the ratio of the power of the first harmonic to the sum of the powers of the 2nd through 9th harmonics, is calculated, utilizing equation 3.

All patterns with harmonic distortion above a desired level are rejected. For N=64 there are over 350 patterns with a harmonic distortion better than −80 dB. The patterns with acceptable harmonic distortion, are ranked according to both amplitude and distortion as follows: $\begin{matrix} {{rank} = {{{- {weight}_{HD}} \cdot {HD}_{n}} + {\frac{{range}({HD})}{{range}({Amp})}{Amp}_{n}}}} & \left( {{equation}\quad 5} \right) \end{matrix}$ where HD_(n) is the harmonic distortion for each trial pattern, Amp_(n), is the deflection amplitude of each trial pattern, weight_(HD) is the desired weight of HD over Amp and the function range( ) is the max( )−min( ) of the values in the population. For the results tabulated, weight_(HD) was set to 1.1 to weight HD 10% more than amplitude.

The following Tables 1-5 list the ten best patterns for patterns having 32, 40, 48, 56 and 64 clock PWM patterns, respectively.

TABLE 1 Ten Best 32 Clock PWM Patterns pattern harmonic pos quarter neg quarter number distortion amplitude pattern pattern rank 64 −83.62 0.661 10111111 01000000 107.14 32 −81.72 0.608 11011111 00100000 103.83 16 −78.63 0.561 11101111 00010000 99.36 63 −76.43 0.633 00111111 11000000 98.59 127 −71.72 0.718 01111111 10000000 95.36 119 −76.05 0.491 01110111 10001000 94.92 111 −73.99 0.532 01101111 10010000 93.59 36 −76.86 0.350 11011011 00100100 92.58 95 −72.09 0.579 01011111 10100000 92.58 59 −75.70 0.375 00111011 11000100 91.88

TABLE 2 Ten Best 40 Clock PWM Patterns pattern harmonic pos quarter neg quarter number distortion amplitude pattern pattern rank 64 −84.94 0.624 1110111111 0001000000 108.02 128 −83.99 0.657 1101111111 0010000000 107.74 383 −83.46 0.639 0101111111 1010000000 106.74 447 −82.59 0.606 0110111111 1001000000 105.01 479 −83.07 0.576 0111011111 1000100000 104.83 255 −80.45 0.674 0011111111 1100000000 104.25 272 −80.83 0.514 1011101111 0100010000 100.92 256 −75.88 0.692 1011111111 0100000000 99.64 136 −80.75 0.457 1101110111 0010001000 99.51 247 −79.78 0.474 0011110111 1100001000 98.84

TABLE 3 Ten Best 48 Clock PWM Patterns pattern harmonic ampli- pos quarter neg quarter number distortion tude pattern pattern rank 1791 −87.54 0.648 011011111111 100100000000 115.22 1919 −86.16 0.626 011101111111 100010000000 113.06 1467 −92.28 0.358 010110111011 101001000100 111.97 1088 −85.30 0.580 101110111111 010001000000 110.77 991 −85.20 0.549 001111011111 110000100000 109.75 1535 −80.83 0.672 010111111111 101000000000 108.54 1536 −81.18 0.646 100111111111 011000000000 108.17 1519 −84.30 0.509 010111101111 101000010000 107.60 544 −82.73 0.537 110111011111 001000100000 106.68 1152 −80.31 0.601 101101111111 010010000000 105.89

TABLE 4 Ten Best 56 Clock PWM Patterns pattern harmonic number distortion amplitude pos quarter pattern neg quarter pattern rank 4352 −93.00 0.622 10111011111111 01000100000000 118.39 4608 −91.32 0.638 10110111111111 01001000000000 116.95 3967 −90.60 0.598 00111101111111 11000010000000 115.14 3839 −87.87 0.613 00111011111111 11000100000000 112.52 2176 −88.12 0.589 11011101111111 00100010000000 112.17 5879 −91.42 0.440 01011011110111 10100100001000 111.95 6079 −87.92 0.567 01011110111111 10100001000000 111.38 5120 −85.53 0.655 10101111111111 01010000000000 111.03 6176 −86.32 0.536 10011111011111 01100000100000 108.82 3583 −83.77 0.629 00110111111111 11001000000000 108.42

TABLE 5 Ten Best 64 Clock PWM Patterns pattern harmonic number distortion amplitude pos quarter pattern neg quarter pattern rank 24063 −93.934 0.617 0101110111111111 1010001000000000 119.40 9216 −92.709 0.637 1101101111111111 0010010000000000 118.58 8704 −90.778 0.625 1101110111111111 0010001000000000 116.14 24319 −89.925 0.606 0101111011111111 1010000100000000 114.71 24704 −90.38 0.582 1001111101111111 0110000010000000 114.58 15359 −88.66 0.644 0011101111111111 1100010000000000 114.31 23419 −94.756 0.378 0101101101111011 1010010010000100 114.08 4608 −88.696 0.611 1110110111111111 0001001000000000 113.49 10240 −87.69 0.649 1101011111111111 0010100000000000 113.37 10272 −90.616 0.523 1101011111011111 0010100000100000 113.30

FIG. 5 is a schematic diagram illustrating a resonant scanning mirror driver circuit 400 according to another embodiment of the present invention and that can be driven with the single pulse width modulated digital signal 300 shown In FIG. 4 b. It can also be used with the PWM patterns shown in Tables 1-5. The bias input level most preferably is set to the middle of the operating range of the input signal.

FIG. 6 is a schematic diagram illustrating a resonant scanning mirror driver circuit 500 according to yet another embodiment of the present invention and that is also suitable to be driven with the single pulse width modulated digital signal shown in FIG. 4 b that is generated via the digital pattern shown in FIG. 4 a. It can also be used with the PWM patterns of Tables 1-5. Driver circuit 500 can be shown to have a more symmetric output voltage. The output is defined according to the relationship $\begin{matrix} {{v_{out} = {\frac{s + {\left( {A + 1} \right)\omega}}{s + \omega}v_{i\quad n}}},} & \left( {{equation}\quad 6} \right) \end{matrix}$ where ω is the pole of the driver, not including the mirror coil, and A is the amplifier's dc voltage gain. The topology of driver circuit 500 was found by the present inventor to have improved AC characteristics because both the positive (+) and negative (−) outputs have the same frequency transfer function.

In view of the above, it can be seen the present invention presents a significant advancement in the art of MEMS mirror driver circuits. Further, this invention has been described in considerable detail in order to provide those skilled in the resonant scanning mirror driver circuit art with the information needed to apply the novel principles and to construct and use such specialized components as are required. In view of the foregoing descriptions, it should be apparent that the present invention represents a significant departure from the prior art in construction and operation. However, while particular embodiments of the present invention have been described herein in detail, it is to be understood that various alterations, modifications and substitutions can be made therein without departing in any way from the spirit and scope of the present invention, as defined in the claims which follow. 

1. A resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 32 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of: Pos quarter Neg quarter pattern pattern 10111111 01000000 11011111 00100000 11101111 00010000 00111111 11000000 01111111 10000000 01110111 10001000 01101111 10010000 11011011 00100100 01011111 10100000 00111011 
 11000100.


2. The resonant scanning mirror driver circuit of claim 1 wherein a second quarter of the sine wave is generated with a time reversed version of the first quarter pattern.
 3. A resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 40 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of: Pos quarter Neg quarter pattern pattern 1110111111 0001000000 1101111111 0010000000 0101111111 1010000000 0110111111 1001000000 0111011111 1000100000 0011111111 1100000000 1011101111 0100010000 1011111111 0100000000 1101110111 0010001000 0011110111 
 1100001000.


4. The resonant scanning mirror driver circuit of claim 3 wherein a second quarter of the sine wave is generated with a time reversed version of the first quarter pattern.
 5. A resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 48 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of: Pos quarter Neg quarter pattern pattern 011011111111 100100000000 011101111111 100010000000 010110111011 101001000100 101110111111 010001000000 001111011111 110000100000 010111111111 101000000000 100111111111 011000000000 010111101111 101000010000 110111011111 001000100000 101101111111 
 010010000000.


6. The resonant scanning mirror driver circuit of claim 5 wherein a second quarter of the sine wave is generated with a time reversed version of the first quarter pattern.
 7. A resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 56 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of: Pos quarter Neg quarter pattern pattern 10111011111111 01000100000000 10110111111111 01001000000000 00111101111111 11000010000000 00111011111111 11000100000000 11011101111111 00100010000000 01011011110111 10100100001000 01011111011111 10100001000000 10101111111111 01010000000000 10011111011111 01100000100000 00110111111111 
 11001000000000.


8. The resonant scanning mirror driver circuit of claim 7 wherein a second quarter of the sine wave is generated with a time reversed version of the first quarter pattern.
 9. A resonant scanning mirror driver circuit configured to drive a micro-electro-mechanical system (MEMS) mirror to a desired deflection utilizing a PWM pattern selected from patterns having 64 bits, first positive and negative quarters of the PWM pattern being selected from the group consisting of: Pos quarter Neg quarter pattern pattern 0101110111111111 1010001000000000 1101101111111111 0010010000000000 1101110111111111 0010001000000000 0101111011111111 1010000100000000 1001111101111111 0110000010000000 0011101111111111 1100010000000000 0101101101111011 1010010010000100 1110110111111111 0001001000000000 1101011111111111 0010100000000000 1101011111011111 
 0010100000100000.


10. The resonant scanning mirror driver circuit of claim 9 wherein a second quarter of the sine wave is generated with a time reversed version of the first quarter pattern.
 11. A micro-electro-mechanical system (MEMS) resonant scanning mirror driver utilizing a PWM pattern to drive the mirror to a desired deflection, the PWM pattern being selected for reduced harmonic distortion by: a) generating a drive signal utilizing PWM patterns for a predetermined number of bits; b) digitally sampling the drive signal at a rate of at least N*f₀, where N=the number of bits in the PWM pattern and f₀=the clock frequency; c) repeating a and b at least K times where K=the Q of the system; d) estimating the deflection of the mirror utilizing a second order linear model of the mirror dynamics converted to a discrete time model of the system; e) generating a Fast Fourier Transform (FFT) of the estimated deflection; f) determining harmonic distortion as ratio of power of first harmonic to sum of powers of second through ninth harmonics.
 12. The MEMS system scanning mirror driver of claim 11 wherein patterns having a harmonic distortion above a desired level are rejected.
 13. The MEMS system scanning mirror driver of claim 11 wherein the pattern is ranked using the formula: ${rank} = {{{- {weight}_{HD}} \cdot {HD}_{n}} + {\frac{{range}({HD})}{{range}({Amp})}{Amp}_{n}}}$ where HD_(n) is the harmonic distortion for each trial pattern, Amp_(n), is the deflection amplitude of each trial pattern, weight_(HD) is the desired weight of HD over Amp and the function ran( ) is the max( )−min( ) of the values in the population.
 14. The MEMS system scanning mirror driver of claim 13 wherein weight_(HD) is set to 1.1 to weight harmonic distortion ten percent more than amplitude.
 15. The MEMS system scanning mirror driver of claim 14 wherein the number of PWM bit patterns that must be searched for minimum harmonic distortion is $2^{({\frac{N}{4} - 1})}.$
 16. The MEMS system scanning mirror driver of claim 13 wherein the number of PWM bit patterns that must be searched for minimum harmonic distortion is $2^{({\frac{N}{4} - 1})}.$
 17. The MEMS system scanning mirror driver of claim 11 wherein the number of PWM bit patterns that must be searched for minimum harmonic distortion is $2^{({\frac{N}{4} - 1})}.$ 